#include "QSpongeMuscle.h"

QSpongeMuscle::QSpongeMuscle(void)
{
    type = 1;
}

void QSpongeMuscle::calculateForce(void)
{
    l = sqrt(pow(nList[0]->getPos().x()-nList[1]->getPos().x(),2)+pow(nList[0]->getPos().y()-nList[1]->getPos().y(),2));
    f = k*(defL - l);
}
